const path = require('path')
const devServer = require('webpack-dev-server')
const htmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
    entry: path.resolve(__dirname, 'src'),
    output: {
        path: path.resolve(__dirname, 'dist'),
        filename: 'bundle.js'
    },
    module: {
        rules: [
            {
                test:/\.scss$/,
                use:['style-loader','css-loader','scss-loader']
            }
        ],
    },
    plugins: [
        new htmlWebpackPlugin({
            title:'HCJ笔记',
            filename:'index.html',
            template:'./src/pages/index.html'
        })
    ],
    devServer: {
        static: {directory: path.join(__dirname, 'src/pages/index.html')},
        port: 8888,
        open: true,
        compress: true,
        proxy: {

        }
    },
    mode: 'development'
}